#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
signed main(){
	int cnt=0;
	while(1){
		system("date_talk.exe");
		system("talk.exe");
		system("std.exe");
		if(system("fc talk.out talk.ans")){
			cout<<"WA on "<<cnt<<'\n';
			break;
		}else{
			cout<<cnt++<<" is ac\n";
		}
	}
	return 0;
}

